<?xml version="1.0"?>
<jsp:root 	xmlns:jsp="http://java.sun.com/JSP/Page"
 			xmlns:c="http://java.sun.com/jsp/jstl/core"
 			xmlns="http://www.w3.org/1999/xhtml"
 			version="2.1">
 
 <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
 <jsp:directive.page isELIgnored="false" />
 <jsp:output 	omit-xml-declaration="false" 
 			 	doctype-root-element="HTML" 
 				doctype-system="about:legacy-compat" />
 
 <jsp:useBean id="datosLogin" class="es.javamyadmin.beans.LoginBean" scope="session" />
 
 <jsp:useBean id="listaDatabasesBean" class="es.javamyadmin.beans.ListaDatabasesBean" scope="session" />
 
 <jsp:setProperty property="user" name="listaDatabasesBean" value="${datosLogin.usuario}" />
 <jsp:setProperty property="pass" name="listaDatabasesBean" value="${datosLogin.password}" />
 <jsp:setProperty property="host" name="listaDatabasesBean" value="${datosLogin.servidor}" />
 <jsp:setProperty property="port" name="listaDatabasesBean" value="${datosLogin.puerto}" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/verTablasAjax.js"><!-- A --></script>

<style type="text/css">

.oculto {
	display: none;
}

.visible {
	display: block;
}
</style>
 <div id="sidebar">
 
	 <div class="logo"><a href="${pageContext.request.contextPath}/jsp/inicio.jsp" title="ir al Inicio"><img src="${pageContext.request.contextPath}/images/logo-java-myadmin.png" width="250" height="96" alt="logo"/></a></div>
	<div class="exit"><a href="${pageContext.request.contextPath}/cerrarSesion" title="Cerrar sesion"><img src="${pageContext.request.contextPath}/images/icons/cerrarSesion.png" width="20" height="20" alt="Cerrar sesion"/></a></div>
	 <p>Seleccione una Base de datos</p>
	
 	 <ul>	
		 <c:forEach var="lista" items="${listaDatabasesBean.databases}">
		 	<li><img src="${pageContext.request.contextPath}/images/arrow.png" height="6px" width="6px" style="cursor: pointer;" onClick="cargarTablas('${datosLogin.usuario}','${datosLogin.password}','${datosLogin.servidor}','${datosLogin.puerto}','${lista.nombreBD}')"/><a href="${pageContext.request.contextPath}/jsp/lista-tablas-bd.jsp?bd=${lista.nombreBD}"><c:out value="${lista.nombreBD}"></c:out></a>
		 	<span  class="oculto" id="contenido${lista.nombreBD}"><img style="margin-left: 5px;" src="${pageContext.request.contextPath}/images/loading.gif" height="15px" width="15px" /></span>
		 	</li>
		 </c:forEach>
	</ul> 
 
 </div>
 
</jsp:root>